// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.PurchaseChangeOrder;
import com.fowo.api.model.purchase.change.order.PurchaseChangeOrderItemVo;
import com.fowo.api.model.purchase.change.order.PurchaseChangeOrderSearchParamPo;
import com.fowo.api.model.purchase.change.order.PurchaseChangeOrderVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface PurchaseChangeOrderMapper
  extends BaseMapper<PurchaseChangeOrder> {
  Page<PurchaseChangeOrderItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  List<OptionItem<PurchaseChangeOrderItemVo>> searchOptions(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  List<PurchaseChangeOrderItemVo> search(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  Date searchLastUpdateTime(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") PurchaseChangeOrderSearchParamPo search);
  /**
   * 返回满足搜索条件的统计信息
   * @param search 搜索参数
   */
  Map<String, Object> searchForStatistical(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  Long getIdByOrderSn(@Param("orderSn") String orderSn);

  List<Long> getIdsByOrderSn(@Param("list") List<String> list);

  String getOrderSnById(@Param("id") Long id);

  List<Map<String, Object>> getOrderSnByIds(@Param("ids") List<Long> ids);
  PurchaseChangeOrderVo selectVoById(@Param("id") Long id);
  /** 更新指定对象的所有计算字段值 */
  int updateCalcFields(Long id);
  /**
   * 全部
   */
  List<PurchaseChangeOrderItemVo> allAlter(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );

  /**
   * 获取全部编号列表
   */
  List<Long> allAlterIds(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );

  /**
   * 获取全部的总数
   */
  Long allAlterCount(@Param("search") PurchaseChangeOrderSearchParamPo search);

  /**
   * 全部分页
   */
  Page<PurchaseChangeOrderItemVo> allAlterPage(
    @Param("page") Page page,
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  Date allAlterLastUpdateTime(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  /**
   * 待审批
   */
  List<PurchaseChangeOrderItemVo> pendingApproval(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );

  /**
   * 获取待审批编号列表
   */
  List<Long> pendingApprovalIds(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );

  /**
   * 获取待审批的总数
   */
  Long pendingApprovalCount(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );

  /**
   * 待审批分页
   */
  Page<PurchaseChangeOrderItemVo> pendingApprovalPage(
    @Param("page") Page page,
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  Date pendingApprovalLastUpdateTime(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  /**
   * 已处理
   */
  List<PurchaseChangeOrderItemVo> processed(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );

  /**
   * 获取已处理编号列表
   */
  List<Long> processedIds(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );

  /**
   * 获取已处理的总数
   */
  Long processedCount(@Param("search") PurchaseChangeOrderSearchParamPo search);

  /**
   * 已处理分页
   */
  Page<PurchaseChangeOrderItemVo> processedPage(
    @Param("page") Page page,
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  Date processedLastUpdateTime(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  /**
   * 已驳回
   */
  List<PurchaseChangeOrderItemVo> rejected(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );

  /**
   * 获取已驳回编号列表
   */
  List<Long> rejectedIds(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );

  /**
   * 获取已驳回的总数
   */
  Long rejectedCount(@Param("search") PurchaseChangeOrderSearchParamPo search);

  /**
   * 已驳回分页
   */
  Page<PurchaseChangeOrderItemVo> rejectedPage(
    @Param("page") Page page,
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
  Date rejectedLastUpdateTime(
    @Param("search") PurchaseChangeOrderSearchParamPo search
  );
}
